﻿using Orchard.UI.Resources;

namespace MidnightPixel.jQueryValidate {
	public class ResourceManifest : IResourceManifestProvider {
		public void BuildManifests(ResourceManifestBuilder builder) {
			var manifest = builder.Add();

			// jQuery Validate scripts
			manifest.DefineScript("jQueryValidate").SetUrl("jquery.validate.min.js", "jquery.validate.js").SetVersion("1.11.1").SetDependencies("jQuery")
					.SetCdn("//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js", "//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js", true);

			// Additional Methods
			manifest.DefineScript("jQueryValidate_AdditionalMethods").SetUrl("additional-methods.min.js", "additional-methods.js").SetVersion("1.11.1").SetDependencies("jQueryValidate")
					.SetCdn("//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/additional-methods.min.js", "//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/additional-methods.js", true);
		}
	}
}